package lancoo.com.net.retrofitrxjava.retrofit;

import lancoo.com.net.retrofitrxjava.okhttp.Okhttp;
import retrofit2.Retrofit;
import retrofit2.adapter.rxjava2.RxJava2CallAdapterFactory;
import retrofit2.converter.gson.GsonConverterFactory;

/**
 * Created by pengmi on 2017/6/14.
 */

public class JsonRetrofit {

    public static Retrofit.Builder getBuilder() {
        return new Retrofit.Builder()
                .client(Okhttp.okHttpClient)
//                .addConverterFactory(FastJsonConverterFactory.create())
                .addConverterFactory(GsonConverterFactory.create())
                .addCallAdapterFactory(RxJava2CallAdapterFactory.create());

    }
    public static Retrofit.Builder getBuilder1() {
        return new Retrofit.Builder()
                .client(Okhttp.okHttpClient1)
//                .addConverterFactory(FastJsonConverterFactory.create())
                .addConverterFactory(GsonConverterFactory.create())
                .addCallAdapterFactory(RxJava2CallAdapterFactory.create());

    }
}
